package com.dididoctor.doctor.Activity.Usercentre.MyPurse.WithdrawList;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.dididoctor.doctor.MV.EduActivity;
import com.dididoctor.doctor.R;

/**
 * Created by liying on 2016/4/29.
 */
public class WithdrawalsSuccedActivity extends EduActivity {
    private String balance = "";
    private String from = "";
    private TextView mTvTop, mTvBottom;
    private Button mBtnConfrim;


    @Override
    public void init() {
        initView();
    }

    @Override
    public void onClickEvent(View view) {
        switch (view.getId()) {
            case R.id.btn_confirm:
                setResult(RESULT_OK);
                WithdrawalsSuccedActivity.this.finish();
                break;
        }
    }

    @Override
    public void setContentLayout() {
        setContentView(R.layout.activity_withdrawals);
    }

    public void initView() {
        balance = getIntent().getStringExtra("balance");
        from = getIntent().getStringExtra("from");
        mTvTop = (TextView) findViewById(R.id.tv_top);
        mTvBottom = (TextView) findViewById(R.id.tv_bottom);
        mBtnConfrim = (Button) findViewById(R.id.btn_confirm);
        mBtnConfrim.setOnClickListener(this);
        if (from.equals("0")) {
            ((TextView) findViewById(R.id.tv_title)).setText("提现成功");
            mTvTop.setText("恭喜您提现成功");
            mTvBottom.setText("恭喜您成功提现"+balance+"元到您绑定的收款账户，我们将在72小时内将钱转到您的账上，届时请注意查收");
        } else {
            ((TextView) findViewById(R.id.tv_title)).setText("退款成功");
            mTvTop.setText("恭喜您退款成功");
            mTvBottom.setText("恭喜您成功退款"+balance+"元到您原支付账户，我们将在72小时内将钱转到您的账上，届时请注意查收");
        }
    }
}
